#ifndef _HTTPCLI_H
#define _HTTPCLI_H

#include "utils.h"

struct HttpReq{
    const char *url;
    const char *method;
    struct{
        const char **headers;
        _i nheaders_x_2;
    };
    Source body;
    _i status_code; //@param status_code[out]:http status, 200/400/500...
};

struct HttpCli{
    Error *(*req) (struct HttpReq *) __prm_nonnull __mustuse;
};

__pub struct HttpCli httpcli;

#endif //_HTTPCLI_H
